<?php
// +----------------------------------------------------------------------
// | 通用工具配置文件
// +----------------------------------------------------------------------

return [
    // +----------------------------------------------------------------------
    // | 上传配置
    // +----------------------------------------------------------------------
    'upload' => [
        'image' => [
            //允许上传格式
            'fileExt' => 'jpg,png,gif,jpeg',
            //允许上传大小
            'fileSize' => 10 * 1024 * 1024,
            //是否启用压缩
            'compress' => false,
            //压缩质量，建议0.5 ~ 1
            'percent' => 0.5,
            //本地存储路径
            'local' => app()->getRootPath() . 'public/uploads/image/',
            //对外路径
            'url' => '/uploads/image/',
        ],
        //视频库配置
        'video' => [
            //允许上传格式
            'fileExt' => 'mp4,mov,flv,avi,mkv',
            //允许上传大小
            'fileSize' => 50 * 1024 * 1024,
            //本地存储路径
            'local' => app()->getRootPath() . 'public/uploads/video/',
            //对外路径
            'url' => '/uploads/video/'
        ],
        //文件配置
        'file' => [
            //允许上传格式
            'fileExt' => 'xls,xlsx,csv',
            //允许上传大小
            'fileSize' => 10 * 1024 * 1024,
            //本地存储路径
            'local' => app()->getRootPath() . 'public/uploads/file/',
            //对外路径
            'url' => '/uploads/file/'
        ]
    ],

    // +----------------------------------------------------------------------
    // | Composer自动创建文件夹，目前仅支持在运行目录public下
    // +----------------------------------------------------------------------
    'autoCreateFolder' => [
        [
            'name' => 'ACCESS_TOKEN',
            'permissions' => 0777
        ],
        [
            'name' => 'backups',
            'permissions' => 0777
        ],
        [
            'name' => 'download',
            'permissions' => 0777
        ],
        [
            'name' => 'logs',
            'permissions' => 0777
        ],
        [
            'name' => 'qrcode',
            'permissions' => 0777
        ],
        [
            'name' => 'queue',
            'permissions' => 0777
        ],
        [
            'name' => 'uploads',
            'permissions' => 0777
        ]
    ]
];
